<template>
    <div id="head">
        <i v-if="isback" onclick="history.go(-1)" class="el-icon-arrow-left toback"></i>
        <i v-if="isProduce" @click="blob" class="el-icon-arrow-left toback"></i>
        <i v-if="isArt" @click="blob" class="el-icon-arrow-left toback"></i>    
        <p>{{title}}</p>
<!--        <router-link to='/trends/addTrend?type=2' v-if="$route.query.type==2" class="addTrend"><i class="el-icon-edit-outline"></i></router-link>-->
        <slot></slot>
    </div>
</template>

<script>

export default {
    props:{
        title:{
            type:String
        },
        isback:{
            type:Boolean,
            default:false
        },
        isright:{
            type:Boolean,
            default:false
        },
        isProduce:{
            type:Boolean,
            default:false
        },
        isArt:{
            type:Boolean,
            default:false
        }
    },
    methods:{
        blob(){
            this.$emit('tomove');
        }
    }
}
</script>

<style scoped >
#head {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    height: 3rem;
    line-height: 3rem;
    font-size: 1.2rem;
    width: 100%;
    background: #2790A6;
    color: #303133;
    position: fixed;
    top: 0;
    z-index: 10;
}
#head p{
    color:#ffffff;
}
#head .isline{
    position: absolute;
    bottom: 0;
    display: block;
    width: 100%;
    height: 50%;
    border-bottom: 1px solid #DCDFE6;
    box-sizing: border-box;
    box-shadow: 0rem 0.1rem 0.2rem #EBEEF5;
}
#head .toback{
    position: absolute;
    color: #ffffff;
    top: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    line-height: 3rem;
    font-size: 2rem;
    padding-left: 0.5rem;
    z-index: 100;
}
.addTrend{
    position: absolute;
    right: 1rem;
    top: 0;
}
.addTrend i{
    display: block;
    line-height: 3rem;
    font-size: 1.5rem;
    color: #F56C6C;
}
</style>
